#ifndef BALL_H
#define BALL_H

#include <QGraphicsItem>

class Ball : public QGraphicsObject
{
	Q_OBJECT
	Q_PROPERTY(QSize size
			   READ getSize
			   WRITE setSize)

	QPointF initialPosition;
	QSize size;

public:
	explicit Ball(QGraphicsObject *parent = 0);
	void mousePressEvent(QGraphicsSceneMouseEvent *event);
	void mouseReleaseEvent(QGraphicsSceneMouseEvent * event);
	void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
	QRectF boundingRect() const;
	QPainterPath shape () const;
	QSize getSize();
	void setSize(QSize size);


	
signals:
	void moved(const QPointF &from, const QPointF &to, Ball *ball);
	
public slots:
	
};

#endif // BALL_H
